home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
misc
/
allma.zip
/
FREPLACE.SMM
< prev
next >
Wrap
INI File
|
1994-11-28
|
7KB
|
453 lines
[ver]
4
[sty]
_macro.sty
[files]
[charset]
82
ANSI (Windows, IBM CP 1252)
[revisions]
0
[prn]
PostScript Printer
[port]
LPT1:
[lang]
1
[fldnames]
Field1
Field2
Field3
Field4
Field5
Field6
Field7
Field8
[desc]
Find and replace across multiple files
Lotus WPD Marketing
Intermediate
Replace, FileOpen, Local Arrays
noautorun
786074104
31
676699899
121
2
0
0
0
0
0
[fopts]
0
1
0
0
[lnopts]
2
Body Text
1
[docopts]
5
2
[GramStyle]
[l1]
0
[pg]
2
46 0 60 0 0 1 0 65535 3 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
86 0 10 1025 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
[edoc]
<:#288,9360>Macro by <+!>Charlie Pappas<-!>
<:#276,9360>
<:#276,9360>function freplace()
<:#276,9360>IF IsNewWave()
<:#276,9360> Message("Macro not available while running under HP NewWave.")
<:#276,9360> Exit Function
<:#276,9360>ENDIF
<:#276,9360>'ignorekeyboard(2)
<:#276,9360>again:
<:#276,9360>filledit(9001, strcat$(GetDocPath$(), "*.s?m"))
<:#276,9360>box = dialogbox(".", "files")
<:#276,9360>if box <<<;> 1
<:#276,9360> return 0
<:#276,9360>endif
<:#276,9360>findit = getdialogfield$(8007)
<:#276,9360>replaceit = getdialogfield$(8008)
<:#276,9360>if getdialogfield$(8001) = ""
<:#276,9360> message("select files from the list")
<:#276,9360> goto again
<:#276,9360>endif
<:#276,9360>cdir = getcurrentdir$()
<:#276,9360>dim files(100)
<:#276,9360>for i = 1 to 100
<:#276,9360> file = Ucase$(strfield$(getdialogfield$(8001), i, " "))
<:#276,9360> if file = "" or file = -1
<:#276,9360> break
<:#276,9360> endif
<:#276,9360> files(i) = file
<:#276,9360>next
<:#276,9360>Count = GetOpenFileCount()
<:#276,9360>If Count <<1
<:#276,9360> Count = 1
<:#276,9360>Endif
<:#276,9360>Dim OpenFiles(Count)
<:#276,9360>GetOpenFileNames(&OpenFiles)
<:#276,9360>
<:#276,9360>for j = 1 to i - 1
<:#276,9360> file = files(j)
<:#284,9360><:f240,2Times New Roman,255,0,0> ifopen = 0
<:#284,9360><:f240,2Times New Roman,255,0,0> Count = GetOpenFileCount()
<:#284,9360><:f240,2Times New Roman,255,0,0> IF Count <;> 0
<:#284,9360><:f240,2Times New Roman,255,0,0> DIM Filess(Count)
<:#284,9360><:f240,2Times New Roman,255,0,0> GetOpenFileNames(&Filess)
<:#284,9360><:f240,2Times New Roman,255,0,0> FOR II = 1 to Count
<:#284,9360><:f240,2Times New Roman,255,0,0> f = filess(II)
<:#284,9360> <:f240,2Times New Roman,255,0,0>pathplace = instr(0, f, "\")
<:#284,9360><:f240,2Times New Roman,255,0,0> while pathplace <<<;> 0
<:#284,9360><:f240,2Times New Roman,255,0,0> pathtemp = pathplace + 1
<:#284,9360><:f240,2Times New Roman,255,0,0> pathplace = instr(pathtemp, f,"\")
<:#284,9360><:f240,2Times New Roman,255,0,0> wend
<:#284,9360><:f240,2Times New Roman,255,0,0> length = len(f)
<:#284,9360><:f240,2Times New Roman,255,0,0> pathplace = right$(f, length - pathtemp + 1)
<:#284,9360><:f240,2Times New Roman,255,0,0> if pathplace = ucase$(file) and ifopen = 0 then
<:#284,9360><:f240,2Times New Roman,255,0,0> ifopen = 1<:f>
<:#284,9360><:f240,2Times New Roman,255,0,0> <:f><:f240,2Times New Roman,255,0,0>endif
<:#284,9360><:f240,2Times New Roman,255,0,0> NEXT <:f>
<:#284,9360> <:f240,2Times New Roman,255,0,0>endif
<:#284,9360><:f240,2Times New Roman,255,0,0> if ifopen = 0 then<:f>
<:#276,9360> FileOpen(strcat$(cdir, file), 1, "")
<:#276,9360> replace(0, 0, 1024, findit, replaceit)
<:#276,9360> save()
<:#276,9360> fileclose()
<:#284,9360> <:f240,2Times New Roman,255,0,0>else<:f>
<:#284,9360> <:f240,2Times New Roman,255,0,0>selectwindow({file})
<:#284,9360><:f240,2Times New Roman,255,0,0> type("<[>CtrlHome]")
<:#284,9360><:f240,2Times New Roman,255,0,0> replace(0,0, 1024, findit, replaceit)
<:#284,9360><:f240,2Times New Roman,255,0,0> save()
<:#284,9360><:f240,2Times New Roman,255,0,0> endif <:f>
<:#276,9360>next
<:#276,9360>end function
<:#276,9360>
DIALOG files
-2134376448 11 89 20 148 187 "" "" "Multiple File Find & Replace"
FONT 8 "Helv"
6 58 76 8 1000 1342177280 "static" "&Search Across Files:" 0
14 6 60 8 1003 1342308352 "static" "F&ind:" 0
14 16 120 12 8007 1350631552 "edit" "" 0
14 30 60 8 1004 1342308352 "static" "&Replace With:" 0
14 40 120 12 8008 1350631552 "edit" "" 0
6 68 68 120 9001 1352728587 "listbox" "" 0
92 111 40 14 1 1342373889 "button" "OK" 0
92 131 40 14 2 1342373888 "button" "Cancel" 0
92 100 48 1 8001 1342177280 "static" "" 0
80 68 59 8 7999 1342177280 "static" "" 0
1 1 147 185 1002 1342177287 "static" "" 0
END DIALOG
>
[Embedded]
00004799
>
[macsum] 2
freplace 0 0 18 2
files 1533 0 -1 71
[macse]
14 freplace
0 1317
13
11 00000109
0 3 "Macro not available while running under HP NewWave."
6 0
15
9
0 268
13
0 16 [X] "*.s?m"
13
0 31 9001 [X]
0 26 "." "files"
13
8 1
6 1
5 1
18 1
11 00000225
5 0
15
9
0 27 8007
13
8 2
0 27 8008
13
8 3
0 27 8001
13
7 ""
18 0
11 00000352
0 3 "select files from the list"
10 00000109
0 290
13
8 4
5 100
21 5 [X]
5 1
8 6
5 100
6 6
18 2
12 00000472
10 00000624
5 1
6 6
3 0
8 6
10 00000395
0 27 8001
13
0 20 [X] "{6}" " "
13
0 18 [X]
13
8 7
6 7
7 ""
18 0
6 7
5 -1
18 0
1 2
11 00000595
10 00000624
6 6
6 7
23 5
10 00000439
0 1050
13
8 8
6 8
5 1
18 5
11 00000680
5 1
8 8
6 8
21 9 [X]
0 1051 &9
5 1
8 10
6 6
5 1
3 1
6 10
18 2
12 00000805
10 00001521
5 1
6 10
3 0
8 10
10 00000717
6 10
22 5
8 7
5 0
8 11
0 1050
13
8 8
6 8
5 0
18 3
11 00001310
6 8
21 12 [X]
0 1051 &12
5 1
8 13
6 8
6 13
18 2
12 00000996
10 00001310
5 1
6 13
3 0
8 13
10 00000918
6 13
22 12
8 14
0 808 0 "{14}" "\"
13
8 15
6 15
5 0
18 1
11 00001145
6 15
5 1
3 0
8 16
0 808 "{16}" "{14}" "\"
13
8 15
10 00001045
0 14 "{14}"
13
8 17
6 17
6 16
3 1
5 1
3 0
0 807 "{14}" [X]
13
8 15
6 15
0 18 "{7}"
13
18 0
6 11
5 0
18 0
1 1
11 00001297
5 1
8 11
10 00000961
6 11
5 0
18 0
11 00001441
0 16 "{4}" "{7}"
13
2 102 1 [X] 1 ""
2 488 1 0 0 1024 "{2}" "{3}"
2 103 1
2 147 1
10 00001508
0 796 "{7}"
0 6 "[16420]"
2 488 1 0 0 1024 "{2}" "{3}"
2 103 1
10 00000770
6 0
15
9
DIALOG files
-2134376448 11 89 20 148 187 "" "" "Multiple File Find & Replace"
FONT 8 "Helv"
6 58 76 8 1000 1342177280 "static" "&Search Across Files:" 0
14 6 60 8 1003 1342308352 "static" "F&ind:" 0
14 16 120 12 8007 1350631552 "edit" "" 0
14 30 60 8 1004 1342308352 "static" "&Replace With:" 0
14 40 120 12 8008 1350631552 "edit" "" 0
6 68 68 120 9001 1352728587 "listbox" "" 0
92 111 40 14 1 1342373889 "button" "OK" 0
92 131 40 14 2 1342373888 "button" "Cancel" 0
92 100 48 1 8001 1342177280 "static" "" 0
80 68 59 8 7999 1342177280 "static" "" 0
1 1 147 185 1002 1342177287 "static" "" 0
00004824